//
// Created by LanK on 2024/12/29.
//
#include <stdio.h>
#include <string.h>
#include <stdbool.h>

#define MAX_LEN 100

typedef struct {
    char data[MAX_LEN];
    int top;
} Stack;

void initStack(Stack *stack) {
    stack->top = -1;
}

void push(Stack *stack, char c) {
    if (stack->top < MAX_LEN - 1) {
        stack->data[++stack->top] = c;
    }
}

// 出栈
char pop(Stack *stack) {
    if (stack->top == -1) {
        return '\0';
    }
    return stack->data[stack->top--];
}

bool isPalindrome(char *str) {
    int len = strlen(str);
    Stack stack;
    initStack(&stack);

    for (int i = 0; i < len / 2; i++) {
        push(&stack, str[i]);
    }
    int start = (len % 2 == 0) ? len / 2 : len / 2 + 1;

    for (int i = start; i < len; i++) {
        if (str[i] != pop(&stack)) {
            return false;
        }
    }

    return true;
}

int main() {
    char str[MAX_LEN];

    fgets(str, sizeof(str), stdin);
    str[strcspn(str, "\n")] = 0;
    if (isPalindrome(str)) {
        printf("%s是回文。\n", str);
    } else {
        printf("%s不是回文。\n", str);
    }

    return 0;
}
